package com.example.servlet;

import com.example.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller // 定义一个bean
public class RoleServlet {

    @Autowired
    private RoleService roleService;

    public void addRole() {
        System.out.println("封装前端的数据");
        roleService.addRole();
        System.out.println("响应数据或者视图");
    }
}
